﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
    
    <Style x:Key="ButtonFocusVisual">
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate>
                    <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#FFC2F0FF" Offset="0"/>
        <GradientStop Color="#FF68D9FF" Offset="0.5"/>
        <GradientStop Color="#FF79BFFF" Offset="0.5"/>
        <GradientStop Color="#FF00A8FF" Offset="0.996"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="RgbSecond" Color="#FF0081C4"/>
    <LinearGradientBrush x:Key="BgControlSecond" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFDDDDDD" Offset="1"/>
        <GradientStop Color="White" Offset="0.26"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="BgControl" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="White" Offset="1"/>
        <GradientStop Color="WhiteSmoke" Offset="0.26"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>

    <Style x:Key="Speaker" TargetType="{x:Type CheckBox}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <Grid Background="Transparent">
                        <Path x:Name="speaker" Width="8" Height="14" Stretch="Fill" Fill="#FF0081C4" 
                                  Data="F1 M 7.07953,13.2274L 2.79456,9.31506L 0,9.31506L 0,3.91232L 2.79456,3.91232L 7.07953,0L 7.07953,13.2274 Z "/>
                        <Path x:Name="mute" Width="6" Height="6" Margin="12,7,0,0" Stretch="Fill" Fill="Red" 
                                  Data="F1 M 5.68686,2.84341C 5.68686,3.6283 5.40915,4.29843 4.85382,4.85379C 4.29846,5.40915 3.62836,5.68683 2.84344,5.68683C 2.05853,5.68683 1.3884,5.40915 0.833069,4.85379C 0.27771,4.29843 0,3.6283 0,2.84341C 0,2.0585 0.27771,1.38837 0.833069,0.833038C 1.3884,0.277679 2.05853,0 2.84344,0C 3.62836,0 4.29846,0.277679 4.85382,0.833038C 5.40915,1.38837 5.68686,2.0585 5.68686,2.84341 Z M 5.26035,2.81451C 5.26035,2.15552 5.02728,1.59274 4.56113,1.12625C 4.09503,0.65976 3.53207,0.426514 2.87231,0.426514C 2.28217,0.426514 1.74084,0.637177 1.24847,1.0585L 4.625,4.43506C 5.04855,3.94263 5.26035,3.40247 5.26035,2.81451 Z M 4.27734,4.74716L 0.924133,1.39392C 0.592407,1.82712 0.426514,2.31989 0.426514,2.87228C 0.426514,3.53204 0.657562,4.095 1.1196,4.56113C 1.58167,5.02725 2.14258,5.26031 2.80234,5.26031C 3.35324,5.26031 3.84494,5.08926 4.27734,4.74716 Z "/>
                        <Path x:Name="wave" Width="7" Height="12" Margin="15,1,0,0" Stretch="Fill" Fill="#FF0081C4" 
                                  Data="F1 M 8.62329,3.10391C 10.3029,3.22525 11.5508,4.897 11.4106,6.83783C 11.2864,8.55609 10.1159,9.90921 8.68365,10.1128C 9.64276,9.54437 10.3488,8.37085 10.4498,6.97223C 10.5849,5.1012 9.59082,3.47311 8.17023,3.10965L 8.62329,3.10391 Z M 10.5404,1.20441C 13.2278,1.39853 15.2244,4.07333 15.0001,7.17868C 14.8015,9.92786 12.9287,12.0929 10.637,12.4186C 12.1716,11.5092 13.3011,9.63147 13.4628,7.39371C 13.679,4.40002 12.0885,1.79514 9.81549,1.21359C 10.0535,1.19022 10.2956,1.18674 10.5404,1.20441 Z "/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="Visibility" Value="Hidden" TargetName="mute"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="wave"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="false">
                            <Setter Property="Visibility" Value="Hidden" TargetName="wave"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="mute"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="Maximize" TargetType="{x:Type CheckBox}">
        <Setter Property="Background" Value="{StaticResource BgControlSecond}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <Border Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" 
                                Background="{TemplateBinding Background}" 
                                BorderBrush="{StaticResource RgbSecond}" 
                                BorderThickness="1" CornerRadius="2">
                        <Grid Margin="-2,2,0,0">
                            <Rectangle x:Name="rect1" Width="9" Height="9" Stroke="#FF65BBF7" Fill="{StaticResource BgControl}" StrokeThickness="1" Margin="5,-5,0,0" />
                            <Rectangle x:Name="rect2" Width="9" Height="9" Stroke="#FF65BBF7" Fill="{StaticResource BgControl}" StrokeThickness="1" ToolTip="Restore Down"/>
                            <Rectangle x:Name="rect3" Width="11" Height="11" Stroke="#FF65BBF7" Fill="{StaticResource BgControl}" StrokeThickness="2" Margin="2,-2,0,0" ToolTip="Maxmize"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="false">
                            <Setter Property="Visibility" Value="Hidden" TargetName="rect1"/>
                            <Setter Property="Visibility" Value="Hidden" TargetName="rect2"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="rect3"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter Property="Visibility" Value="Visible" TargetName="rect1"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="rect2"/>
                            <Setter Property="Visibility" Value="Hidden" TargetName="rect3"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" Value="{StaticResource BgControl}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{StaticResource BgControlSecond}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Foreground" Value="#FF0081C4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" 
                                Background="{TemplateBinding Background}" 
                                BorderBrush="{StaticResource RgbSecond}" 
                                BorderThickness="1" CornerRadius="2">
                        <Grid>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <!--<Setter Property="Background" Value="#FF65BBF7"/>-->
                            <Setter Property="Background" Value="{StaticResource BgControl}"/>
                            <!--<Setter Property="Foreground" Value="{StaticResource BgControlSecond}"/>-->
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" Value="0.55" TargetName="DisabledVisualElement"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="stopButton" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{StaticResource BgControlSecond}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Foreground" Value="#FF0081C4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" 
                                Background="{TemplateBinding Background}" 
                                BorderBrush="{StaticResource RgbSecond}" 
                                BorderThickness="1" CornerRadius="2">
                        <Grid>
                            <Rectangle x:Name="content" Width="15" Height="15" RadiusX="1" RadiusY="1" Fill="#FF65BBF7"/>
                            <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" Value="#FF65BBF7"/>
                            <Setter Property="Fill" TargetName="content" Value="{StaticResource BgControlSecond}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" Value="0.55" TargetName="DisabledVisualElement"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="loadButton" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{StaticResource BgControlSecond}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Foreground" Value="#FF0081C4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" 
                                Background="{TemplateBinding Background}" 
                                BorderBrush="{StaticResource RgbSecond}" 
                                BorderThickness="1" CornerRadius="2">
                        <Grid>
                            <Path x:Name="folder" Width="20" Height="15" Canvas.Left="0" Canvas.Top="1.52588e-005" Stretch="Fill" Fill="#FF65BBF7" 
                                      Data="F1 M 1,2.00002L 3.00003,2.00002L 3.00003,1.00002C 3.00003,0.447739 3.44774,1.52588e-005 4.00003,1.52588e-005L 11,1.52588e-005C 11.5523,1.52588e-005 12,0.447739 12,1.00002L 12,3.00002L 12,7.00002L 12,8.50008C 12,9.05235 11.5523,9.50008 11,9.50008L 1,9.50008C 0.447723,9.50008 0,9.05235 0,8.50008L 0,3.00002C 0,2.44774 0.447723,2.00002 1,2.00002 Z M 5.50005,2.33339C 4.94775,2.33339 4.50003,2.78111 4.50003,3.33339C 4.50003,3.88567 4.94775,4.33339 5.50005,4.33339L 9.50003,4.33339C 10.0523,4.33339 10.5,3.88567 10.5,3.33339C 10.5,2.78111 10.0523,2.33339 9.50003,2.33339L 5.50005,2.33339 Z "/>
                            <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" Value="#FF65BBF7"/>
                            <Setter Property="Fill" TargetName="folder" Value="{StaticResource BgControlSecond}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" Value="0.55" TargetName="DisabledVisualElement"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="PlayPauseButton" TargetType="{x:Type ToggleButton}">
        <Setter Property="Background" Value="{StaticResource BgControlSecond}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" 
                                Background="{TemplateBinding Background}" 
                                BorderBrush="{StaticResource RgbSecond}" 
                                BorderThickness="1" CornerRadius="2">
                        <Grid>
                            <StackPanel x:Name="pause" Orientation="Horizontal" HorizontalAlignment="Center">
                                <Rectangle x:Name="pause1" Fill="#FF65BBF7" RadiusX="1" RadiusY="1" Width="6" Height="15"/>
                                <Rectangle x:Name="pause2" Fill="#FF65BBF7" RadiusX="1" RadiusY="1" Width="6" Height="15" Margin="3,0,0,0"/>
                            </StackPanel>
                            <Path x:Name="play" Width="13" Height="17" Stretch="Fill" StrokeLineJoin="Round"
                                      Margin="1,0,0,0"
                                      HorizontalAlignment="Center" VerticalAlignment="Center"
                                      Fill="#FF65BBF7" 
                                      Data="F1 M 19.84,19.84L 0,39.6801L 0,0L 19.84,19.84 Z "/>
                            <!--<Path x:Name="play" Width="15.092" Height="16.9735" Canvas.Left="3.05156e-005" Canvas.Top="-0.240453" Stretch="Fill" Fill="#FF65BBF7" Data="F1 M 14.1835,9.84848L 2.82385,16.4069C 2.53223,16.6124 2.17656,16.733 1.79271,16.733C 0.802658,16.733 -1.52588e-005,15.9304 3.05176e-005,14.9403L 3.05176e-005,1.79398C 3.05176e-005,1.45609 0.0935059,1.14001 0.256042,0.870239C 0.286041,0.797577 0.321152,0.726105 0.361511,0.656189C 0.856552,-0.201233 1.95293,-0.495026 2.81036,3.05176e-005L 14.1954,6.57321C 14.8357,6.94287 15.1617,7.64786 15.0796,8.33826C 15.0647,8.94223 14.745,9.52429 14.1835,9.84848 Z "/>-->
                            <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" Value="#FF65BBF7"/>
                            <Setter Property="Fill" Value="{StaticResource BgControlSecond}" TargetName="play"/>
                            <Setter Property="Fill" Value="{StaticResource BgControlSecond}" TargetName="pause1"/>
                            <Setter Property="Fill" Value="{StaticResource BgControlSecond}" TargetName="pause2"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="true">
                            <Setter TargetName="pause" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="false">
                            <Setter TargetName="play" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" Value="0.55" TargetName="DisabledVisualElement"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>